package com.bwie.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.Brand;
import com.bwie.service.BrandService;
import com.bwie.mapper.BrandMapper;
import com.bwie.utils.R;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author 61630
* @description 针对表【tb_brand】的数据库操作Service实现
* @createDate 2024-08-06 11:34:53
*/
@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand>
    implements BrandService{
    @Resource
    private BrandMapper brandMapper;

    @Override
    public R getBrands(Integer id) {
        QueryWrapper<Brand> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(Brand::getBrandNum,id);
        List<Brand> brands = brandMapper.selectList(wrapper);
        return R.success(brands);
    }
}




